import { createApp } from "vue";
import pinia from "./stores";
import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue"; // 引入icons-vue
import * as jxfIcons from "@/components/jxf/icons";
import "element-plus/dist/index.css";

import App from "./App.vue";
import router from "./router";

import "./assets/css/main.css";

const app = createApp(App);

// 注册elementplus icon
app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

//统一注册 jxf-icon图标
for (let icon in jxfIcons) {
  app.component(`jxfIcon${icon}`, jxfIcons[icon]);
}

app.use(pinia);
app.use(router);
app.mount("#app");
